/*
 * @Author: giky 
 * @Date: 2018-12-12 15:22:09 
 * @Last Modified by: giky
 * @Last Modified time: 2018-12-12 15:54:39
 */
// 工具函数
import config from './config'
// import { resolve } from 'path';
export function get(url,pdata) {
    return new Promise((resolve,reject)=>{
        wx.request({
            url:config.host + url,
            data: pdata,
            success:function (res) {
                if(res.data.code == 800200){
                    resolve(res.data)
                }else{
                    reject(res.data)
                }
            },
            header: {
                'content-type': 'application/json' // 默认值
            }
        })
    })
}